package com.hyx.api.mapper;

import com.hyx.api.domain.RefundOrder;
import com.hyx.api.domain.vo.RefundOrderVo;
import com.hyx.api.domain.vo.ShopOrderListVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 退单记录Mapper接口
 *
 * @author ruoyi
 * @date 2023-10-21
 */
public interface RefundOrderMapper extends BaseMapperPlus<RefundOrder, RefundOrderVo> {

    List<ShopOrderListVo> queryRefundOrderList(@Param("status") Integer status,
                                               @Param("recoverBusId") Integer recoverBusId,
                                               @Param("startAmount") BigDecimal startAmount,
                                               @Param("endAmount") BigDecimal endAmount,
                                               @Param("keyword") String keyword,
                                               @Param("shopId") Long shopId,
                                               @Param("userId") Long userId,
                                               @Param("companyId") Long companyId);

    /**
     * 回收商端
     * 如果登录用户为报价师则不传recycleBusId
     * 如果登录用户为回收商总账户，则不传userId
     *
     * @param queTime
     * @param userId
     * @param recycleBusId
     * @return
     */
    Long queryRefundCountByTimeUser(@Param("queTime") Date queTime,
                                    @Param("userId") Long userId,
                                    @Param("recycleBusId") Long recycleBusId);

}

